/** 合作方管理 **/
import { base_url } from '../request.config';

const partnerApi = {
  me_info: 'franchise/me/info', // 获取登录人信息
  me_logout: 'franchise/me/logout', // 退出
  franchisee_list: 'franchise/franchisee/list', // 合作商列表
  franchisee_set_offline: 'franchise/franchisee/set_offline', // 合作商下线
  franchisee_detail: 'franchise/franchisee/detail', // 合作商详情
  franchisee_search: 'franchise/franchisee/search', // 合作商查询
  franchisee_get_gardens_by_phone: 'franchise/franchisee/get_gardens_by_phone', // 导入社区
  franchisee_search_garden: 'franchise/franchisee/search_garden', // 获取社区数据
  franchisee_save: 'franchise/franchisee/save', // 添加合作商
  franchisee_update: 'franchise/franchisee/update', // 修改合作商
  fcs_push_conf_edit_page: 'franchise/fcs_push_conf/edit_page', // 获取推送配置
  fcs_push_conf_update: 'franchise/fcs_push_conf/update', // 更新推送配置
  fcs_push_conf_test: 'franchise/fcs_push_conf/test', // 测试推送
  contract_posthouse_list: 'franchise/contract/posthouse/list', // 驿站合同列表
  contract_posthouse_terminate: 'franchise/contract/posthouse/terminate', // 终止合同
  contract_posthouse_detail: 'franchise/contract/posthouse/detail', // 驿站合同详情
  common_org_list: 'franchise/common/org/list', // 查询所有合同主体
  contract_posthouse_save: 'franchise/contract/posthouse/save', // 新增驿站合同
  contract_posthouse_update: 'franchise/contract/posthouse/update', // 编辑驿站合同
  contract_posthouse_search_by_name: 'franchise/contract/posthouse/search_by_name', // 查询签约驿站
  contract_posthouse_add: 'franchise/contract/posthouse/add', // 获取合同编号
  contract_list: 'franchise/contract/list', // 合作商合同列表
  contract_terminate: 'franchise/contract/terminate', // 终止合同
  contract_detail: 'franchise/contract/detail', // 加盟合同详情
  contract_add: 'franchise/contract/add', // 根据合作商获取合同
  contract_is_contract_num_unique: 'franchise/contract/is_contract_num_unique', // 检查编号是否唯一
  contract_get_repayment_info: 'franchise/contract/get_repayment_info', // 获取还款信息
  contract_save_franchise: 'franchise/contract/save_franchise', // 添加加盟合同
  contract_update_franchise: 'franchise/contract/update_franchise', // 修改加盟合同
  contract_save_sale: 'franchise/contract/save_sale', // 添加销售合同
  contract_update_sale: 'franchise/contract/update_sale', // 修改销售合同
  contract_save_loan: 'franchise/contract/save_loan', // 添加借贷合同
  contract_update_loan: 'franchise/contract/update_loan', // 修改借贷合同
  franchisee_upload_file: 'franchise/franchisee/upload_file', // 上传文件
  contract_sale_contract_info: 'franchise/contract/sale_contract_info', // 获取销售合同基本信息
  account_recharge_query: 'franchise/account/recharge/query', // 合作商充值列表
  account_recharge_weali_submit: 'franchise/account/recharge/weali/submit', // 充值操作
  account_recharge_pay_query: 'franchise/account/recharge/pay_query', // 查询充值状态
  consume_detail_index: 'franchise/consume/detail/index', // 消费明细
  common_area_garden_search: 'franchise/common/area/garden_search', // 小区查询
  account_recharge_log_list: 'franchise/account/recharge/log_list', // 充值记录查询
  consume_stat_index: 'franchise/consume/stat/index', // 统计曲线
  account_withdraw_query: 'franchise/account/withdraw/query', // 合作商提现列表
  account_withdraw_pay_way: 'franchise/account/withdraw/pay_way', // 获取可提现金额
  account_withdraw_alipay_submit: 'franchise/account/withdraw/alipay/submit', // 支付宝提现
  income_stat_index: 'franchise/income/stat/index', // 统计曲线
  income_detail_index: 'franchise/income/detail/index', // 入账明细
  account_withdraw_log_list: 'franchise/account/withdraw/log_list', // 提现记录
  withdraw_perm_index: 'franchise/withdraw_perm/index', // 提现权限列表
  withdraw_perm_toggle: 'franchise/withdraw_perm/toggle', // 提现权限禁止操作
  statement_list: 'franchise/statement/list', // 合作商结算单列表
  statement_save: 'franchise/statement/save', // 修改金额
  statement_confirm: 'franchise/statement/confirm', // 确认操作
  statement_detail: 'franchise/statement/detail', // 结算单详情

  business_type: 'franchise/inner/franchisee/get_biz_type',//业务类型
  user_type: 'franchise/inner/franchisee/get_pay_side',  //用户类型
  device_type: 'franchise/inner/franchisee/get_storage_type', //设备类型

  send_pcode: 'franchise/account/withdraw/vcode/send',//获取手机验证码
};

const partner: any = Object.keys(partnerApi)
  .reduce((origin, item) => {
    origin[item] = `${base_url}/${partnerApi[item]}`;
    return origin;
  }, {})

export default partner;
